using System;
using System.Collections.Generic;
using System.Data.Odbc;

using Entity;

namespace Entity {
    
	/// <summary>
	/// Cada instancia de esta clase representa un mensaje.
	/// </summary>
    public class Tweet : IEntity
	{
        private int id;
        
        private string message;
        private User owner = new User();
        private List<User> taged = new List<User>();

        
        public Tweet()
        {
            this.id= 0;
            this.message = "";
        }

        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        
        public string Message
        {
            get { return message; }
            set { message= value; }
        }

        public User Owner
        {
            get { return owner; }
            set { owner = value; }
        }
        
        public List<User> Taged
        {
            get { return taged; }
            set { taged = value; }
        }
        public override bool Equals(Object obj)
        {
            
            bool result = false;
            if (obj is Tweet)
            {
                Tweet t = (Tweet)obj;
                result = true;
                result = result && t.Id.Equals(this.Id);
                result = result && t.Message.Equals(this.Message);
            }
            return result;
        }

        public object getId()
        {
            return Id;
        }
    }
}
